import requests

class loginAPI:
    def __init__(self):
        self.url ="http://localhost:81/index.php?m=Home&c=User&a=verify"
        self.urls = "http://localhost:81/index.php?m=Home&c=User&a=do_login"
        self.session = requests.Session()

    def verify(self):
        return self.session.get(url=self.url)

    def login(self, username, password, verify):
        data = {
            "username": username,
            "password": password,
            "verify_code": verify
        }

        return self.session.post(url=self.urls, data=data)